#INCLUDE "PROTHEUS.CH"
#INCLUDE "FWMVCDEF.CH"

USER FUNCTION TstDuplPv()
LOCAL cTitulo := OEMTOANSI("Itens Originais Pedido Venda")
LOCAL oBrowse := NIL

NEW MODEL ;
TYPE 2 ;
DESCRIPTION OEMTOANSI("Itens Originais Pedido Venda") ;
BROWSE oBrowse ;
SOURCE "TstDuplPv" ;
MODELID "ModDuplPv" ;
MASTER "ZZH" ;
HEADER {"ZZH_NUM", "ZZH_CLI", "ZZH_LOJA", "ZZH_NOMCLI", "ZZH_VEND", "ZZH_NOMVEN", "ZZH_DATEMI"} ;
RELATION {{"ZZH_FILIAL", "xFilial('ZZH')"}, ;
{"ZZH_NUM", "ZZH_NUM"}} ;
PRIMARYKEY {"ZZH_FILIAL", "ZZH_NUM", "ZZH_ITEM"} ;
UNIQUELINE {"ZZH_ITEM", "ZZH_PROD"} ;
ORDERKEY ZZH->(IndexKey(1)) ;
AUTOINCREMENT "ZZH_ITEM"

RETURN NIL

//-----------------------------------------------------------------